<script lang="ts">
	import { onMount } from 'svelte';

	const { modalBody, onModalBodyLoaded = () => {} } = $props<{
		modalBody?: any;
		onModalBodyLoaded?: (e: MouseEvent) => void;
	}>();

	// 内容挂载后调用父组件传递的回调
	onMount(() => {
		onModalBodyLoaded();
	});
</script>

<div class="body-container">
	{@render modalBody?.()}
</div>

<style scoped lang="scss">
    .body-container{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
</style>
